package cloudgamemysql

import (
	"gorm.io/gorm"
	"time"
)

/*
  @author liubogeng
  @date   2024/11/1 11:44
*/

// CGUserFromQQ QQ第三方授权用户表
type CGUserFromQQ struct {
	ID        int64          `json:"id" gorm:"column:id;type:bigint;primaryKey;autoIncrement;comment:ID"`
	UserID    int64          `json:"user_id" gorm:"column:user_id;type:bigint;comment:UserID"`
	OpenID    string         `json:"open_id" gorm:"column:open_id;type:varchar(500);not null;default:'';comment:授权用户唯一标识"`
	Phone     string         `json:"phone" gorm:"column:phone;type:varchar(20);not null;default:'';comment:用户手机号"`
	NickName  string         `json:"nick_name" gorm:"column:nick_name;type:varchar(32);not null;default:'';comment:用户昵称"`
	Avatar    string         `json:"avatar" gorm:"column:avatar;type:varchar(1000);not null;default:'';comment:用户头像"`
	CreatedAt time.Time      `json:"created_at" gorm:"column:created_at;type:datetime;comment:该条记录创建时间"`
	UpdatedAt time.Time      `json:"updated_at" gorm:"column:updated_at;type:datetime;comment:该条记录修改时间"`
	DeletedAt gorm.DeletedAt `json:"-" gorm:"index;type:datetime;comment:该条记录删除时间"`
}

func (CGUserFromQQ) TableName() string {
	return "cg_user_from_qq"
}
